/**
 * Created by Administrator on 2017/3/24.
 */
import {Injectable} from '@angular/core';
import { Subject } from 'rxjs/Subject';
@Injectable()
export class NavigationBarService {
    constructor() {

    }
    private missionAnnouncedSource = new Subject<string>();
    missionAnnounced$ = this.missionAnnouncedSource.asObservable();



    //当组件或者服务中的数据有更改的时候调用这个方法即可将更改的数据推送到其他组件。
    setNavigationBar(str: string) {
        this.missionAnnouncedSource.next(str);
    }


}